import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import NProgress from 'nprogress'
NProgress.configure({ easing: 'cubic-bezier', speed: 600 });
// 公共css
Vue.config.productionTip = false
import GlobalCss from '@/assets/css/main.css'
import animate from '@/assets/css/animate.css'
import awesome from '@/assets/css/font-awesome.min.css'
import layui from '@/assets/css/layui.css'
import nprogress from 'nprogress/nprogress.css'
Vue.use(animate).use(awesome).use(GlobalCss).use(layui).use(nprogress);
/* 路由发生变化修改页面title */
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  NProgress.start();
  next()
})
router.afterEach(() => {
  NProgress.done();
 });
Vue.prototype.windowSysInfo = {
    bwid: document.documentElement.clientWidth,
    bhig: document.documentElement.clientHeight,
    wwid: document.documentElement.offsetWidth,
    whig: document.documentElement.offsetHeight,
    ihig: window.innerHeight,
    shig: window.screen.height,
    stop: window.screenTop,
};
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
